package com.xhwl.data.service.devplatform;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xhwl.common.dto.cent.sdata.devplatform.DeveloperDTO;
import com.xhwl.common.pojo.ResultJson;
import com.xhwl.common.pojo.cent.sdata.Account;
import com.xhwl.common.pojo.cent.sdata.devplatform.Developer;
import com.xhwl.common.query.cent.sdata.devplatform.DeveloperQuery;
import com.xhwl.data.pojo.vo.DevelopStatusVO;
import feign.RequestLine;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: luyi
 * @Description:
 * @Date: Create in 15:15 2022/6/21
 */
@RestController
public interface IDeveloperService extends IService<Developer> {

    /**
     * 校验租户名称及社会统一信用代码
     * @param code
     * @param creditCode
     * @return
     */
    ResultJson checkDeveloper(String code, String creditCode);

    /**
     * 校验企业名称
     * @param creditCode
     * @return
     */
    ResultJson checkEnterprise(String creditCode);
    /**
     * 注册开发者
     * @param developer
     * @return
     */
    ResultJson registerDeveloper(DeveloperDTO developer);

//    /**
//     * 更新
//     * @param developer
//     * @return
//     */
//    ResultJson update(DeveloperDTO developer);

    /**
     * 分页查询
     * @param developerQuery
     * @param page
     * @return
     */
    @PostMapping("/develop-service/page")
    Page<DeveloperDTO> page(@RequestPart("developerQuery") DeveloperQuery developerQuery, @RequestPart("page") Page page);

    /**
     * 列表查询
     * @param developerQuery
     * @return
     */
    @PostMapping("/develop-service/list")
    List<DeveloperDTO> list(@RequestPart("developerQuery") DeveloperQuery developerQuery);

    /**
     * 获取开发者详情
     * @param id
     * @return
     */
    @PostMapping("/develop-service/detail")
    DeveloperDTO detail(@RequestPart("id") Integer id);

    @PostMapping("/develop-service/get-by-code")
    Developer getByCode(String code);

    /**
     * 开发者审核
     * @param developerDTO
     * @return
     */
    ResultJson auditDeveloper(DeveloperDTO developerDTO, Integer industryId);

    @PostMapping("/develop-service/get-default")
    Developer getDefault();

}
